﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using nERP.Model.Wms;
using nERP.Model;
using nERP.Model._Admin;

namespace nERP.ViewModel.Wms.OtherOutWarehouseVMs
{
    public partial class OtherOutWarehouseTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._OtherOutWarehouse._OtherOutWarehouseCode")]
        public ExcelPropety OtherOutWarehouseCode_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.OtherOutWarehouseCode);
        [Display(Name = "_Model._OtherOutWarehouse._OtherOutType")]
        public ExcelPropety OtherOutType_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.OtherOutTypeId);
        [Display(Name = "_Model._OtherOutWarehouse._MakeUser")]
        public ExcelPropety MakeUser_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.MakeUserId);
        [Display(Name = "_Model._OtherOutWarehouse._InvoicesDate")]
        public ExcelPropety InvoicesDate_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.InvoicesDate, true);
        [Display(Name = "_Model._OtherOutWarehouse._Status")]
        public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.Status);
        [Display(Name = "_Model._OtherOutWarehouse._Remark")]
        public ExcelPropety Remark_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.Remark);
        //[Display(Name = "_Model._OtherOutWarehouse._CreateTime")]
        //public ExcelPropety CreateTime_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.CreateTime, true);
        //[Display(Name = "_Model._OtherOutWarehouse._UpdateTime")]
        //public ExcelPropety UpdateTime_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.UpdateTime, true);
        //[Display(Name = "_Model._OtherOutWarehouse._CreateBy")]
        //public ExcelPropety CreateBy_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.CreateBy);
        //[Display(Name = "_Model._OtherOutWarehouse._UpdateBy")]
        //public ExcelPropety UpdateBy_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.UpdateBy);
        //[Display(Name = "_Model._OtherOutWarehouse._IsValid")]
        //public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.IsValid);
        //[Display(Name = "_Model._OtherOutWarehouse._TenantCode")]
        //public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<OtherOutWarehouse>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            OtherOutType_Excel.DataType = ColumnDataType.ComboBox;
            OtherOutType_Excel.ListItems = DC.Set<DicField>().Where(x => x.DicDef.DicName == "出库业务类别").OrderBy(x => x.Order).GetSelectListItems(Wtm, y => y.DicFieldDes.ToString(), SortByName: false);

        }

    }

    public class OtherOutWarehouseImportVM : BaseImportVM<OtherOutWarehouseTemplateVM, OtherOutWarehouse>
    {
            //import

    }

}